{extend name="admin@public/base" /}
{block name="main-content"}
<div class="page-content">
    <link rel="stylesheet" href="__PUBLIC__/bootstrap-select/css/bootstrap-select.min.css">
    <!--主题-->
    <div class="page-header">
        <h1>
            您当前操作
            <small>
                <i class="ace-icon fa fa-angle-double-right"></i>
                添加分类
            </small>
        </h1>
    </div>
    <div class="row">
        <div class="col-xs-12">
            <form class="form-horizontal ajaxForm2" name="cat_add" enctype="multipart/form-data" method="post" action="{:url('admin/Cat/add')}">
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 分类名称：  </label>
                    <div class="col-sm-10">
                        <input type="text" name="cat_name"  placeholder="输入分类名称" class="col-xs-6 col-sm-6" required/>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1">选择模块： </label>
                    <div class="col-sm-9">
                        <select name="cid"  id="parentid" class="col-sm-3 selector">
                            <option value="">选择模块</option>
                            {foreach $moduleList as $k=>$v}
                            <option value="{$v['id']}">{$v.module_name}</option>
                            {/foreach}
                        </select>
                    </div>
                </div>
                <div class="form-group" id="pic_list">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 缩略图： </label>
                    <div class="col-sm-9">
                        <a href="javascript:;" class="file">
                            <input type="file" name="file0" id="file0" multiple="multiple"/>
                            选择上传文件
                        </a>
                        <a href="javascript:;" onclick="return backpic('__PUBLIC__/img/no_img.jpg');" title="还原修改前的图片" class="file">
                            撤销上传
                        </a>

                        <div><img src="__PUBLIC__/img/no_img.jpg" height="70" id="img0" ></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label no-padding-right" for="form-field-1"> 分类简介：  </label>
                    <div class="col-sm-10">
                        <textarea class="col-xs-6 col-sm-6" placeholder="" name="cat_intro"></textarea>
                        <span class="lbl">&nbsp;&nbsp;<span class="red">*</span>可选,备注信息</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 是否开启： </label>
                    <div class="col-sm-9" style="padding-top:5px;">
                        <input name="status" id="menu_open" value="1" class="ace ace-switch ace-switch-4 btn-flat" type="checkbox" />
                        <span class="lbl">&nbsp;&nbsp;默认关闭</span>
                    </div>
                </div>

                <div class="clearfix form-actions">
                    <div class="col-md-offset-3 col-md-9">
                        <button class="btn btn-info" type="submit">
                            <i class="ace-icon fa fa-check bigger-110"></i>
                            保存
                        </button>

                        &nbsp; &nbsp; &nbsp;
                        <button class="btn" type="reset">
                            <i class="ace-icon fa fa-undo bigger-110"></i>
                            重置
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div><!-- /.page-content -->
{/block}